import numpy as np
# a = np.array([1, 2, 3, 4, 5, 6]).reshape([2, 3])
# np.save("a.npy", a)
# b = np.load("a.npy")
# np.savetxt("a.csv", a, '%s', delimiter=',')
# bcsv = np.loadtxt("a.csv", dtype=np.int64, delimiter=',')
'''随机函数'''
# c=np.random.randint(100,200,(2,3))
# d=np.random.rand(2,3)
# e=np.random.rand(4,3,1)


# f=np.random.randn(2,3)
# a=np.array(range(100))
# b=a.copy()
# np.random.shuffle(b)
# c=np.random.permutation(a);
# d=np.random.choice(b,(3,2))
# e=np.random.choice(b,(3,2),replace=False)
# f=np.random.choice(b,(3,2),p=b/np.sum(b))
# g=np.random.uniform(100,200,(3,2))
# h=np.random.normal(100,200,(3,2))
# i=np.random.poisson(100,(3,2))
'''统计函数'''
# a=np.array(range(9)).reshape(3,3)
# b=np.array(range(27)).reshape(3,3,3)
# sum=np.sum(a)
# sum1=np.sum(a,0)
# sum2=np.sum(a,1)
# sum3=np.sum(b,0)
'''梯度函数'''

a=np.asarray(range(9)).reshape(3,3)
b=np.gradient(a)

a=np.asarray(range(9))
np.random.shuffle(a)
b=np.gradient(a)